package com.zcr.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

/**
 * @version 1.0
 * @author： 张诚
 * @date： 2021-02-16 12:02
 */
@Data
public class Pages {

    private long code;
    private String msg;
    private long count;
    private Object data;

    public static Pages success(Page page){
        Pages pages=new Pages();
        pages.setCode(0);
        pages.setCount(page.getTotal());
        pages.setData(page.getRecords());
        return pages;
    }

}
